<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        background: #efefef;
      }

      .box {
        width: 400px;
        height: 400px;
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        margin: auto;
        border: 1px solid #999;
      }
    </style>
  </head>

  <body>
    <button id="btn">点击</button>
    <div class="box" id="box"></div>
  </body>
  <script src="./jquery.min.js"></script>
  <script src="./circel-draw.js"></script>
  <script>
    fn(5);
    function fn(num) {
      $("#box").draw({
        number: num, // 圆的个数
        colors: [
          "#FF8E56",
          "#00A0FF",
          "#0ADFCD",
          "#1678D3",
          "#00D069",
          "#ECB700"
        ],
        text: ["Chrome", "火狐", "Opera", "360", "猎豹", "safari"],
        weight: ["40%", "20%", "90%", "50%", "10%"],
      });
    }

    $("#btn").click(function(){
        $("#box").html("");
        $("#box").clearArray();
        fn(10)
    })

  </script>
</html>
